﻿using MVVM_CAD.Model;
using MVVM_CAD.Strategy;
using MVVM_CAD.ViewModel;
using Ninject.Modules;

namespace WPF_CAD.Test.Common
{
    public class TestNinjectModule : NinjectModule
    {
        public override void Load()
        {
            Bind<IFigure>().To<Point>();
            Bind<IFigure>().To<Line>().WhenInjectedInto<LineToolStrategy>();
            Bind<IFigure>().To<Point>().WhenInjectedInto<PointToolStrategy>();
            Bind<IFigure>().To<PolyLine>().WhenInjectedInto<PolyLineToolStrategy>();
            Bind<IFigure>().To<Polygon>().WhenInjectedInto<PolygonToolStrategy>();
            Bind<IFigure>().To<Circle>().WhenInjectedInto<CircleToolStrategy>();
            Bind<IFigure>().To<Spline>().WhenInjectedInto<SplineToolStrategy>();
            Bind<PolyLineToolStrategy>().ToSelf();
            Bind<LineToolStrategy>().ToSelf();
            Bind<PointToolStrategy>().ToSelf();
            Bind<SelectionToolStrategy>().ToSelf();
            Bind<SplineToolStrategy>().ToSelf();
            Bind<MainViewModel>().ToSelf();
            Bind<IStrategy>().To<PolyLineToolStrategy>();
        }
    }
}